package www.geek.filemanager.ui;

import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import www.geek.filemanager.R;
import www.geek.filemanager.utils.UIHelper;
import www.geek.filemanager.fragments.AppManagerFragment;


/**
 * 应用管理
 *
 * @author : zhanggeng
 * @date   : 2015年7月27日
 * @version: v1.0
 * ----------修订历史-----------
 *
 */
public class AppManagerActivity extends FragmentActivity implements View.OnClickListener {

    //应用标题
    private TextView tv_title;
    //左上角返回图标
    private ImageView  img_back;
    //
    private FragmentManager mFragmentManager = null;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_app_manager);

        initView();







    }

    private void initView() {

        tv_title = (TextView) findViewById(R.id.tv_title);
        tv_title.setText(getResources().getString(R.string.title_app));

        img_back = (ImageView) findViewById(R.id.img_backward);
        img_back.setOnClickListener(this);

        mFragmentManager = getSupportFragmentManager();

        FragmentTransaction ft = mFragmentManager.beginTransaction();

        AppManagerFragment appManagerFragment = new AppManagerFragment();

        ft.add(R.id.app_content, appManagerFragment).commit();



    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.img_backward:
                UIHelper.title_back(this);
                break;
        }
    }
}
